#########################################################
#Figure 3: Expectations of Brexit Effect on National vs Personal Finances (BES)
#########################################################


data2 <- read.dta13("./temp/fig3data.dta")
data2$varorder <- c(1,2,3,4,1,2,3,4)
data2$group <- c(1,1,1,1,2,2,2,2)
ggplot(data2, aes(as.factor(varorder), coef, color=as.factor(group))) + 
  geom_line(aes(group = group, color=as.factor(group)), linetype="solid", lwd=1.2) +
  geom_pointrange(aes(ymin=coef-1.96*stderr, ymax=coef + 1.96*stderr), shape=16, size=.8) +
  scale_color_manual(values=c("gray40",  "tan"), 
                     labels=c("Personal", "National"), name=" ") + 
  scale_x_discrete(labels=c("-1","0", "1", "2")) +
  theme_nice() + ylab("No Change in Circumstances Expected from Leave") + xlab("Property Wealth") + 
  theme(axis.title = element_text(size=14),
        axis.text = element_text(size=12),
        panel.grid.major = element_line(linetype="solid"))  
ggsave("./figures/fig3.pdf")
rm(data2)